package com.lanqiao;

import java.io.*;
import java.util.ArrayList;

public class FileT {
    public static void main(String[] args) throws Exception {
        byte[] input = input("E:\\QQ下载的文件\\txt文件\\20200220笔记.txt");
        output(input);
    }
    public static byte[] input(String url) throws Exception {
        File file =new File(url) ;
        InputStream inputStream = new FileInputStream(file) ;
        int len =(int) file.length();
        byte[] bytes = new byte[len];
        inputStream.read(bytes);
        inputStream.close();
        return bytes ;

    }
    public static void output(byte[] bytes) throws Exception {
        File file = new File("./hh/haha.txt");
        OutputStream outputStream = new FileOutputStream(file) ;
        outputStream.write(bytes);
        outputStream.close();
    }
}
